package graphic;

import graphic.Graphic;
import input.Input;
import org.lwjgl.input.Keyboard;

/**
 *  
 * @author Marcin & Bartek
 * 
 * @description Defines Sun
 */
public final class Sun {
    private Sun(){}
    public static float degree=0f;
    public static float sensitive=0.005f;
    public static boolean change=true;
    
    public static void getInput(){
        if(Input.isKeyDown(Keyboard.KEY_Z)) progress();
        if(Input.isKeyDown(Keyboard.KEY_X)) regress();
    }
    public static void refresh(){
        if(change){
            Graphic.e.setSun(degree);
            change=false;
        }
    }
    
    public static void forceRefresh(){
        Graphic.e.setSun(degree);
    }
    
    public static void progress(){
        change=true;
        degree+=sensitive;
    }
    
    public static void regress(){
        change=true;
        degree-=sensitive;
    }
    
    public static void set(float d){
        change=true;
        degree=d;
    }
}
